INtime SDK Help
_vsnprintf, _vsnprintf_s, _vsnwprintf, _vsnwprintf_s

_vsnprintf sends data to the memory pointed to by buffer.


#include <stdio.h>
#include <stdarg.h>

int _vsnprintf(char *buffer, size_t size, const char *format, va_list ap);
int _vsnprintf_s(char *buffer, size_t size, size_t count, const char *format, va_list ap); #include <wchar.h>
#include <stdarg.h> int _vsnwprintf(wchar_t *buffer, size_t size, const wchar_t *format, va_list ap);
int _vsnwprintf_s(
wchar_t *buffer, size_t size, size_t count, const wchar_t *format, va_list ap);

Parameters

buffer
Storage location for output.
size
The maximum number of characters to be stored in buffer.
count
Maximum number of characters to write (not including the terminating null), or _TRUNCATE.
format
Formatted string. This parameter has the same form and function as in printf.
ap
Pointer to list of arguments. This parameter has type va_list and points to a list of arguments that are converted and output according to the corresponding format specifications in format.

Remarks

These functions are similar to their counterparts vsnprintf and vsnprintf_s. _vsnprintf is identical to vsnprintf. _vsnprintf_s is similar to vsnprintf_s but takes an additional argument count to determine the number of characters to write to the buffer (vsnprintf_s always trancates the output to fit the buffer).

_vsnwpprintf and _vsnwprintf_s are wide-character versions of _vsnprintf and _vsnprintf_s respectively.

Return Values

The number of characters written, not counting the terminating null character.
Success.
A negative value if an output error occurs.
Failure.

Generic Text Routines

tchar.h routine _UNICODE not defined _UNICODE defined
_vsntprintf _vsnprintf _vsnwprintf
_vsntprintf_s _vsnprintf_s _vsnwprintf_s

Requirements

Versions Defined in Include Link to
INtime 3.0
INtime 6.0 (wide-character and generic text versions)
intime/rt/include/stdio.h
intime/rt/include/wchar.h
intime/rt/include/tchar.h
stdio.h
stdarg.h
wchar.h
tchar.h
clib.lib
   
See Also